<?php
namespace Common\Model;    
use Common\Model\BaseModel;
/**
 * 项目预约
 * @author liuyang
 *
 */
class  ProjectAppointmentModel extends BaseModel  {
      
    const STATUS_NO_SERVICE=0;
    const STATUS_SERVICE=1;
    //客户评价完
    const STATUS_APPRAISE=10;
    
    const APPOINT_TYPE=1;
    const TEL_TYPE=2;
    
    //72小时评价时间
    const CONTENT_TIME=259200;
    //半个小时内只能预约相同的一次
    const ADD_TIME=1800;
    
    /**
     * 返回销售所有的信息
     * @param unknown $salesId
     * @return \Think\mixed
     */
    public function getTotalBySalesId($salesId){
        $where = array();
        $where['isshow']=self::IS_SHOW;
        $where['sales_id']=$salesId;
        $where['status']=self::STATUS_NO_SERVICE;
        $total = $this->where($where)->count();
        return $total;
    }
    
    

}